luci-app-statistics: fix read of hostname
authorAnderson McKinley <[email protected]>
Wed, 26 May 2021 06:41:49 +0000 (06:41 +0000)
committerJo-Philipp Wich <[email protected]>
Sat, 12 Jun 2021 17:22:46 +0000 (19:22 +0200)
Existing javascript did not read a non-default statistics hostname due to
incorrect config ids.

Signed-off-by: Anderson McKinley <[email protected]>
(cherry picked from commit 97424d57af1d0e02ea914012c47987541d7ee6a6)

applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/collectd.js

index 282b867c4d2678d67b68f4ebd0194c61a40b8c6b..6c2d5ffa467930258d2fade2cb7f78a39b6929a4 100644 (file)
@@ -52,7 +52,7 @@ return view.extend({
                o.load = function() {
                        return fs.trimmed('/proc/sys/kernel/hostname').then(L.bind(function(name) {
                                this.placeholder = name;
-                               return uci.get('collectd', 'statistics', 'hostname');
+                               return uci.get('luci_statistics', 'collectd', 'Hostname');
                        }, this));
                };